<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>

<jsp:useBean id="nowDate" class="java.util.Date" />
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>管理编辑</title>
	<!-- import css and js --> 
	<%@ include file="/common/metaInput.jsp" %>  
	<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${ctx}/js/jsp/yd/logic/ItemStateData.js"></script>
<script type="text/javascript">
var basic_Url="${ctx}/yd/logic/sowareunfreeze";
var grid;

var ItemStateList = ItemStateData.Rows;//物料等级列表

$(function(){
	
	//表格结构
	var griddata ={};
	grid = $("#table1").ligerGrid({
        columns: [
				{ display: '操作',width: 30,
					    render: function (record, rowindex, value, column) {
					    	var rc = JSON.stringify(record);
						  	  if(record.openBatch=='Y'){
						  		 return "<a href='javascript:ItemWindow("+rc+","+rowindex+")'><img src='${ctx}/js/ligerUI/skins/icons/add.gif' alt='添加' /></a>";
						  	  }else{
						  		 return "<h1>+</h1>";
						  	  }
							  }},
                  { display: 'ID', name: 'id', width: 1 , hide:true},
                  { display: '产品id', name: 'materialsid', width: 1 , hide:true},//使用selecturl时必须设置该属性
                  { display: '<font color="gray">产品编码</font>', name: 'prodNo', width: 120,
                	  render: function (record, rowindex, value, column) {
                		  var rc = JSON.stringify(record);
						  if(record.openBatch=='Y'){
							  return "<a href='javascript:ItemWindow("+rc+","+rowindex+")'>"+record.prodNo+"</a>";
						  	  }else{
						  		 return record.prodNo;
						  	  }
					  	  
					  }},
				  { display: '<font color="gray">产品名称</font>', name: 'prodName', width: 120 },
				  { display: '<font color="gray">型号规格</font>', name: 'prodSpecDesc', width: 150 },
				  { display: '<font color="gray">物料是否可用批次</font>', name: 'openBatch' ,hide:true,width: 150, render: function (item, rowindex, value, column)
					    {
	            	   	if(item.openBatch=="Y"){
	            	   		return "可用";
	            	   	}else{
	            	   		return "不可用";
	            	   	}
				   		
			    }},
				  { display: '<font color="gray">基本单位</font>', name: 'prodBUnit', width: 80},
// 				  { display: '<font color="gray">产品批次</font>', name: 'prodBatch', width: 80},
				  { display: '<font color="gray">等级</font>', name: 'status', width: 80,
					  render: function (item){
	            		  var state=item.status;
	            		  if(state=="1"){
	            			  return "一等品";
	            		  }
	            		  if(state=="2"){
	            			  return "次品";
	            		  }
	            		  if(state=="3"){
	            			  return "旧件";
	            		  }
	            	  	}
				  },
				  { display: '<font color="gray">单位</font>', name: 'prodUnit', width: 70 },
				  { display: '<font color="gray">单位换算率</font>', name: 'prodUnitConvert', width: 70},
				  
// 				  {display : '<font color="gray">本次可解冻数量</font>',name : 'tmpCanFrozenQuantity',width : 100
// 						,render:function(item){
// 							item.tmpCanFrozenQuantity =
// 								item.sqdjQuantity - item.sjdjQuantity;
// 							return item.tmpCanFrozenQuantity;
// 						 }
// 				  },
				  {display : '<font color="gray">本次可解冻数量</font>',name : 'tmpCanFrozenQuantity',width : 100
						,render:function(item){
							item.tmpCanFrozenQuantity =
								item.djQuantity - item.djckQuantity - item.djjdQuantity;
							return item.tmpCanFrozenQuantity+"";
						  }
				  },
				  { display: '申请解冻数量<font color="red">*</font>', name: 'sqjdQuantity', width: 80, type: 'float'
//                 	  //<c:if test="${'ADD' eq flag or '0'eq sowareunfreeze.billstatus or '3'eq sowareunfreeze.billstatus }">
                	  ,editor:{type: 'float'},
                	  render:function(item){
                		  if(item.openBatch=="Y"){
                			  item.sqjdQuantity=item.val;
                		  }else{
	                   		 if(!isNaN(item.sqjdQuantity) && !isNaN(item.prodUnitConvert)){
	                   			if(0==item.sqjdQuantity){
	                       			item.sqjdQuantity = '0';
	                       		}
	                 	    	item.sqjdBQuantity = (item.sqjdQuantity*item.prodUnitConvert).toFixed(4) ;
	                 	    }else{
	                 	    	item.sqjdBQuantity=null;//清除值
	                 	   	}
	                	  }
                		  return item.sqjdQuantity;
                	  }
//                 	  //</c:if>
           		   },
           		  { display: '<font color="gray">申请解冻基本单位数量</font>', name: 'sqjdBQuantity', width: 130, type: 'float'},
                  
           		  { display: '<font color="gray">处理单冻结基本单位数量</font>', name: 'djBQuantity', width: 1 , hide:true},
         		  { display: '<font color="gray">处理单冻结数量</font>', name: 'djQuantity', width: 100},
                
         		  { display: '<font color="gray">基本单位数量</font>', name: 'djckBQuantity', width: 1 , hide:true},
          		  { display: '<font color="gray">处理单冻结出库数量</font>', name: 'djckQuantity', width: 112},
                 
          		  { display: '<font color="gray">基本单位数量</font>', name: 'djjdBQuantity', width: 1 , hide:true},
         		  { display: '<font color="gray">处理单冻结解冻数量</font>', name: 'djjdQuantity', width: 112},
                
           		  
           		  { display: '<font color="gray">订单基本单位数量</font>', name: 'prodBQuantity', width: 1 , hide:true},
           		  { display: '<font color="gray">订单数量</font>', name: 'prodQuantity', width: 80},
                  { display: '已出库基本单位数量', name: 'ckBQuantity', width: 1 , hide:true},
                  { display: '<font color="gray">已出库数量</font>', name: 'ckQuantity', width: 80, type: 'float'},
                  { display: '已冻结基本单位数量', name: 'frozenBQuantity', width: 1 , hide:true},
                  { display: '<font color="gray">已冻结数量</font>', name: 'frozenQuantity', width: 80, type: 'float'},
                  { display: '详细批次', name: 'itemBatch', width:1,hide:1},
                  { display: '修改状态', name: 'updstatus', width: 1 , hide:true},
                  { display: '<font color="gray">值</font>', name: 'val' ,width:1,hide:1},
                  { display: '备注', name: 'remark', width: 150
           			//<c:if test="${'ADD' eq flag or '0'eq sowareunfreeze.billstatus or '3'eq sowareunfreeze.billstatus }">
           			  ,editor: { type: 'text'}
           			//</c:if>
           		  }
                  ],
                  enabledEdit: true,
                  usePager: true,pageSize:1000,pageSizeOptions:[1000],
                  //data : griddata,
                  parms:[{ name : 'id' , value : '${sowareunfreeze.id}'}],
                  url : basic_Url+"/griditems.do",
                  width: "100%", height:'90%',
                  checkbox : true
                //<c:if test="${'ADD' eq flag or '0'eq sowareunfreeze.billstatus or '3'eq sowareunfreeze.billstatus }">
                  ,toolbar : {
          				items : [{
          					text : '删除',
          					click : deleteRow,
          					img : '${ctx}/js/ligerUI/skins/icons/delete.gif'
          				} ]
          			  }
				//</c:if>
     });
	
	//表格数据加载
	/* var manager = $("#table1").ligerGetGridManager();
	//<c:forEach items='${sowareunfreezeitem}' var='item'>
    	manager.addRow2({
    		id : "${item.id}" ,
    		materialsid:"${item.materialsid}",
    		prodNo :"${item.prodNo}",
    		prodName: "${item.prodName}",
    		prodBatch :"${item.prodBatch}",
    		status :"${item.status}",
    		prodSpecDesc :"${item.prodSpecDesc}",
    		prodBUnit :"${item.prodBUnit}",
    		prodBQuantity :"${item.prodBQuantity}",
    		prodUnit :"${item.prodUnit}",
    		prodUnitConvert:"${item.prodUnitConvert}",
    		prodQuantity :"${item.prodQuantity}",
    		ckBQuantity :"${item.ckBQuantity}",
    		ckQuantity :"${item.ckQuantity}",
    		sqjdBQuantity :"${item.sqjdBQuantity}",
    		sqjdQuantity :"${item.sqjdQuantity}",
    		frozenQuantity :"${item.frozenQuantity}",
    		frozenBQuantity :"${item.frozenBQuantity}",
    		
    		djBQuantity :"${item.djBQuantity}",
    		djQuantity :"${item.djQuantity}",
    		djckBQuantity :"${item.djckBQuantity}",
    		djckQuantity :"${item.djckQuantity}",
    		djjdBQuantity :"${item.djjdBQuantity}",
    		djjdQuantity :"${item.djjdQuantity}",
    		remark :"${item.remark}",
    		itemBatch : '${item.itemBatch}',
    		updstatus : "${item.updstatus}",
    		openBatch: "${item.openBatch}",
    		val : "${item.val}"
        });
    //</c:forEach> */
	
	//表单提交验证处理
	$("#inputForm").validate({			   
	onsubmit: true,
	 /*执行ajaxsubmit  */ 
    submitHandler: function(editform) {
        try{			    		
            url =  basic_Url+"/save.do";
            var api = frameElement.api;
        	var W = api.opener;
            getReturnMessage(url,"inputForm",W.searchAP);
        }catch(e){alert(e);}
    }
	});
	
	//按钮处理
	/* btn status */
	$("[id^='btn_fb_']").hide();
	var curStatus = "${sowareunfreeze.billstatus}";//当前所在环节、状态
	if(curStatus == ''){//建单
		$("#btn_fb_save").show();
	}else {
		//$("#btn_fb_exportExcel").show();
		formComponentDisabled(true);//禁用控件
		if (curStatus == '0'||curStatus == '3'){//草稿状态-提交二级
			if("${user.name}"=="${sowareunfreeze.dcruser}"){
				$("#btn_fb_approve_2").show();
				$("#btn_fb_cancel").show();
			}
			formComponentDisabled(false);//启用控件
		}else if (curStatus == '1'){//二级审批中状态
			$("#btn_fb_rebut_2").show();
			$("#btn_fb_end_2").show();
		}else if (curStatus == '4'){//取消状态
		}else{
		}
	}
	
	//添加模式隐藏DIV
	if("${flag}" =="ADD"){
		$("#tr1").hide();
		//$("#tr2").hide();
	}
	
	//页面加载标识隐藏
	$("#pageloading").hide();
	
	//=============================

    
    	//销售订单的值改变触发 //XXX 优化
    	$("#sowarefreeNo").change(function(){ 
    		$("#sowarefreedealNo").empty();
    		//<c:forEach items='${solist}' var='state'>
        	if($(this).find("option:selected").text()=='${state.no}'){
        		$("#soNo").val('${state.soNo}');
        		$("#cliName").val('${state.cliName}');
        		$("#cliNo").val('${state.cliNo}');
        		$("#cliAddr").val('${state.cliAddr}');
        		$("#cliPeo").val('${state.cliPeo}');
        		$("#cliTel").val('${state.cliTel}');
        		$("#cliFax").val('${state.cliFax}');
        		//$("#receipDate").val('<fmt:formatDate value="${state.receipDate}" pattern="yyyy-MM-dd" type="both" />');
        		$("#payMode").val('${state.payMode}');
        		$("#deliveryMode").val('${state.deliveryMode}');
        		$("#currency").val('${state.currency}');
        		$("#exchangeRate").val('${state.exchangeRate}');
        		
        		//冻结处理单列表
        		selSowarefreedealNo("${state.no}");
        		
        		//根据订单编号获得订单的产品item
        		//multipleSearch("#table1",true,"",basic_Url+"/sowarefreezeitemlist.do?sowarefreezeId=${state.id}");
        	}
       		//</c:forEach>
       		
    	}); 
    
});

	//表单提交处理
	function submitForm(param) {
		//设置ajax全局同步
		$("#paramflag").val(param);

		var data = grid.getData();
		var dl = grid.getDeleted();
		if (data.length == 0) {
			$.dialog.alert("请选择申请产品");
			return false;
		}
		
		var ba = true;
		
		if(data !=null){
			var j=0;
			$(data).each(function (){
				j++;
				//表格必填项
				if(this.openBacth!="Y"){
				if (undefined == this.sqjdQuantity
						|| isNaN(this.sqjdQuantity)
						|| this.sqjdQuantity <= 0) {
					$.dialog.alert("第" + j + "行的“申请冻结数量”数据不合法");
					ba = false;
					return false;
				}
				
				if( this.tmpCanFrozenQuantity
						< this.sqjdQuantity){
					$.dialog.alert("您第" + j + "的申请冻结数量大于可冻结数量");
					ba = false;
					return false;
				}
				}


			});
		}
		
		jQuery.ajaxSettings.async = false;
		if (ba) {
			$("#itemdata").val(JSON.stringify(data));
			$("#itemdelete").val(JSON.stringify(dl));
			$("#submitFlag").val(param);
			formComponentDisabled(false);//启用控件
			$("#inputForm").submit();
		}
	}

	function tableSubmit(msg,param){
		$.ligerDialog.confirm(msg, 
				function (flag) { 
				if(flag){
					submitForm(param);
					}
			}); 
	}
	
	function submitFormClose(param){
		tableSubmit('是否确认关闭单据操作？',param);
	}
	
	function submitFormEnd(param){
		tableSubmit('是否确认审批完结操作？',param);
	}
	
	function submitFormRebut(param){
		tableSubmit('是否确认驳回操作？',param);
	}
	
	function deleteRow() {
		grid.deleteSelectedRow();
	}
	
	function exportExcel() {
		var path = basic_Url + "/exportExcel.do?id=${sowareunfreeze.id}";
		window.open(path, "_blank");
	}
	
	//冻结处理单列表
	function selSowarefreedealNo(sowarefreezeNo){
		var jElSowarefreedealNo = $("#sowarefreedealNo");
		$.ajax({
		      url: basic_Url+"/sowarefreezedeallist.do",
		      global: false,
		      type: "POST",
		      dataType: "json",
		      data: ({
		    	sowarefreezeNo : sowarefreezeNo
		      }), 
		      success: function(o){
		    	  jElSowarefreedealNo.empty();
		    	var ls = o.Rows;
		    	jElSowarefreedealNo.append("<option value=''></option>"); 
		    	
	    	  	for(var i=0;i<ls.length;i++){
	    		  	var tmpItem = ls[i];
	    		  	jElSowarefreedealNo.append("<option value='"+tmpItem.no+"'>"+tmpItem.no+"</option>");  
	    		  	if(tmpItem.no == "${sowareunfreeze.sowarefreedealNo}"){
	    		  		jElSowarefreedealNo.val("${sowareunfreeze.sowarefreedealNo}");
	    		  		break;
	    		  	}
	    	  	}
	    	  
	    	  	jElSowarefreedealNo.change(function(){
	    	  		for(var i=0;i<ls.length;i++){
	    	  			var tmpItem = ls[i];
	    	  			
	    	  			if(jElSowarefreedealNo.val()==tmpItem.no){
	    	  			//根据订单编号获得订单的产品item
	    	  			$("#whcode").val(tmpItem.whcode);
		    	  		$("#whname").val(tmpItem.whname);
	    	  			
	            			multipleSearch("#table1",true,"",basic_Url+"/sowarefreezedealitemlist.do?sowarefreezedealId="+tmpItem.id);
	    	  			}
	    	  		}
	    	  		
	    	  	});
		      }
		  });
	}
	function ItemWindow(rc,index) {
	 	var manager = $("#table1").ligerGetGridManager();
			getDG().dialog(
					{
						title : '批次管理',
						width : 650,
						height : 350,
						content : 'url:' + sys_context+ '/yd/logic/sowareunfreeze/itemManager.do?data='+encodeURIComponent(JSON.stringify(manager.getRow(rc.__index)))+'&billstatus=${sowareunfreeze.billstatus}'+'&updstatus='+rc.updstatus,//
						lock : true,
						max : true,
						min : true,
						ok : function() {
							this.content.yz();
							if(this.content.ba){
							var dt = this.content.grid.getData();
							if (dt != null) {
								rc.sqjdBQuantity=this.content.jnum;
								rc.sqjdQuantity=this.content.num;
								rc.val=this.content.num;
								rc.updstatus=1;
								rc.itemBatch=JSON.stringify(dt);
										grid.updateCell('sqjdBQuantity', rc.sqjdBQuantity, manager.getRow(rc.__index));
										grid.updateCell('sqjdQuantity', rc.sqjdQuantity, manager.getRow(rc.__index));
										grid.updateCell('val', rc.val, manager.getRow(rc.__index));
										grid.updateCell('itemBatch',rc.itemBatch, manager.getRow(rc.__index));
										grid.updateCell('updstatus', rc.updstatus, manager.getRow(rc.__index));
										grid.updateRow(manager.getRow(rc.__index));
										this.content.Close();
								}else{
									this.content.Close();
								}
								
							}
							return false;
						},
						cancelVal : '关闭',
						cancel : true
					}).zindex();
		}
</script>

</head>

<body>

<form id="inputForm" action="" method="post">
<input type="hidden" id="id" name="id" value="${sowareunfreeze.id}"/>
<input type="hidden" id="version" name="version" value="${sowareunfreeze.version}"/>
<input type="hidden" id="itemdata" name="itemdata" value=""/>
<input type="hidden" id="dataItem" name="dataItem"/><!-- 单位获取辅助 -->
<input type="hidden" id="itemdelete" name="itemdelete" value=""/>
<input type="hidden" id="paramflag" name="paramflag" value=""/>

<input type="hidden" id="soNo" name="soNo" value="${sowareunfreeze.soNo}"/>

<!-- 用于标识提交按钮 -->
<input type="hidden" id="submitFlag" value="" />
 <div class="pageContent" >
    <div class="panel">
         <table class="TableBlock" align="center">
         			<tr id="tr1">
   		           		<td nowrap="nowrap">单据编号:</td>
   		                <td>
   		                	<input type="text" id="no" name="no" value="${sowareunfreeze.no}" class="inp_width_98p required" readonly="readonly"/>
   		                </td>
   		                <td nowrap="nowrap" width="20%">建单时间:</td>
						<td width="30%"><input type="text" id="dctime" name="dctime" class="inp_width_98p" 
							value="<fmt:formatDate value="${empty sowareunfreeze.dctime?nowDate:sowareunfreeze.dctime}" type="both" dateStyle="long" pattern="yyyy-MM-dd" />" readonly="readonly"/></td>
   		           </tr>
                   <tr>
                    	<td nowrap="nowrap">冻结申请单编号:</td>
						<td>
						<c:choose>
						<c:when test="${'ADD' eq flag}">
						<select id="sowarefreeNo" name="sowarefreeNo" class="inp_width_98p required" >
							<option> </option>
							<c:forEach items="${solist}" var="sodo">
								<option value="${sodo.no}">${sodo.no}</option>
							</c:forEach>
						</select>
						<script type="text/javascript">
   		                	$("#sowarefreeNo").val("${sowareunfreeze.sowarefreeNo}");
   		                </script>
						</c:when>
						<c:otherwise>
						<input type="text" value="${sowareunfreeze.sowarefreeNo}" id="sowarefreeNo" name="sowarefreeNo" class="inp_width_98p required" readonly="readonly"></input>
						</c:otherwise>
						</c:choose>
   		            	</td>
                    	<td nowrap="nowrap">冻结处理单编号</td>
   		                <td>
   		                <c:choose>
						<c:when test="${'ADD' eq flag}">
						<select id="sowarefreedealNo" name="sowarefreedealNo" class="inp_width_98p required" >
						</select>
						<script type="text/javascript">
   		                	$("#sowarefreedealNo").val("${sowareunfreeze.sowarefreedealNo}");
   		                </script>
						</c:when>
						<c:otherwise>
						<input type="text" value="${sowareunfreeze.sowarefreedealNo}" id="sowarefreedealNo" name="sowarefreedealNo" class="inp_width_98p required" readonly="readonly"></input>
						</c:otherwise>
						</c:choose>
   		                </td>
   		           </tr>
   		           <tr>
   		                <td nowrap="nowrap">客户编号:</td>
   		           		<td><input type="text" id="cliNo" name="cliNo" value="${sowareunfreeze.cliNo}" class="inp_width_98p required" readonly="readonly"></input></td>
   		           		<td nowrap="nowrap">客户单位名称:</td>
   		           		<td><input class="inp_width_98p" type="text" id="cliName" name="cliName" value="${sowareunfreeze.cliName}" class="inp_width_98p required" readonly="readonly"></input></td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">客户联系人:</td>
   		           		<td><input type="text" class="inp_width_98p" id="cliPeo" name="cliPeo" value="${sowareunfreeze.cliPeo}" readonly="readonly"></input></td>
   		           		<td nowrap="nowrap">客户联系电话:</td>
   		           		<td><input type="text" class="inp_width_98p" id="cliTel" name="cliTel" value="${sowareunfreeze.cliTel}" readonly="readonly"></input></td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">传真:</td>
   		           		<td><input type="text" class="inp_width_98p" id="cliFax" name="cliFax" value="${sowareunfreeze.cliFax}" readonly="readonly"></input></td>
   		           		<td nowrap="nowrap">仓库:</td>
   		           		<td><input type="text" class="inp_width_98p" id="whname" name="whname" value="${sowareunfreeze.whname}"/><!-- 仓库名称 -->
   		           			<input type="hidden" id="whcode" name="whcode" value="${sowareunfreeze.whcode}" readonly="readonly" class="inp_width_98p required"/><!-- 仓库编码 -->
							
   		           		</td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">客户地址:</td>
   		            	<td colspan="3">
   		                	<input class="inp_width_98p" type="text" id="cliAddr" name="cliAddr" value="${sowareunfreeze.cliAddr}" readonly="readonly"/>
   		             	</td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">付款方式:</td>
   		           		<td>
						<input type="text" class="inp_width_98p" value="${sowareunfreeze.payMode}" id="payMode" name="payMode" readonly="readonly"></input>
   		           		</td>
   		           		<td nowrap="nowrap">交货方式:</td>
   		           		<td>
						<input type="text" class="inp_width_98p" value="${sowareunfreeze.deliveryMode}" id="deliveryMode" name="deliveryMode" readonly="readonly"></input>
   		           		</td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">币别:</td>
   		           		<td>
						<input type="text" class="inp_width_98p" value="${sowareunfreeze.currency}" id="currency" name="currency" readonly="readonly"></input>
						</td>
   		           		<td nowrap="nowrap">汇率:</td>
   		           		<td><input type="text" class="inp_width_98p" id="exchangeRate" name="exchangeRate" value="${sowareunfreeze.exchangeRate}" readonly="readonly"></input></td>
   		           </tr>
   		           <tr>
   		           		<td nowrap="nowrap">制单人:</td>
   		           		<td><input type="text" class="inp_width_98p" id="listerName" name="listerName" value="${empty sowareunfreeze.listerName?user.realName:sowareunfreeze.listerName}" readonly="readonly"></input></td>
   		           		<td nowrap="nowrap">制单人部门:</td>
   		           		<td>
   		           		<c:choose>
   		           		<c:when test="${'ADD' eq flag or '0'eq sowareunfreeze.billstatus or '3'eq sowareunfreeze.billstatus }">
   		           		<select id="listerDeptName" name="listerDeptName" class="inp_width_98p">
								<option></option>
								<c:forEach items="${depts }" var="item">
									<option value="${item.depname }">${item.depname}</option>
								</c:forEach>
						</select> 
   		           			<script type="text/javascript">
   		           				$("#listerDeptName").val("${sowareunfreeze.listerDeptName}");
   		           		</script>
   		           		</c:when>
						<c:otherwise>
						<input type="text" class="inp_width_98p" value="${sowareunfreeze.listerDeptName}" id="listerDeptName" name="listerDeptName" readonly="readonly"></input>
						</c:otherwise>
						</c:choose>
   		           		</td>
   		           </tr>
   		           <%-- <tr id="tr2">
   		           		<td nowrap="nowrap">审核人:</td>
   		           		<td><input type="text" id="auditorName" name="auditorName" value="${sowareunfreeze.auditorName}" readonly="readonly"></input></td>
   		           		<td nowrap="nowrap">批准人:</td>
   		           		<td><input type="text" id="approverName" name="approverName" value="${sowareunfreeze.approverName}" readonly="readonly"></input></td>
   		           </tr> --%>
   		           <tr>
                    <td nowrap="nowrap">备注:</td>
   		                 <td colspan="3">
   		                <input class="inp_width_98p" type="text" id="remark" name="remark" value="${sowareunfreeze.remark}" />
   		                 </td>
   		           </tr>
                </table>
                <div id="table1"> </div>               
         </div>
         <div class="formBar">
	        <ul>
		        <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="btn_fb_save" onclick="submitForm(0)">保存</button></div></div></li>
		        <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="btn_fb_approve_2" onclick="submitForm(1)" title="提交二级审核">提交</button></div></div></li>
		      	<li><div class="buttonActive"><div class="buttonContent"><button type="button" id="btn_fb_cancel" onclick="submitFormClose(4)" title="取消订单">取消</button></div></div></li>
		      	
		      	<webres:displaycontroller elementId="LOGIC_SOWAREUNFREEZE_2WANJIE" description="销售解冻二级完结">
		      	<li><div class="buttonActive"><div class="buttonContent"><button type="button" id="btn_fb_end_2" onclick="submitFormEnd(2)" title="二级结案">审核</button></div></div></li>
		      	</webres:displaycontroller>
		      	<webres:displaycontroller elementId="LOGIC_SOWAREUNFREEZE_2BOHUI" description="销售解冻二级驳回">
		      	<li><div class="button"><div class="buttonContent"><button type="button" id="btn_fb_rebut_2" onclick="submitFormRebut(3)" title="二级驳回到草稿">驳回</button></div></div></li>
		      	</webres:displaycontroller>
		      	
		      	<li><div class="button"><div class="buttonContent"><button type="button" id="btn_fb_exportExcel" class="export" onclick="exportExcel()">导出</button></div></div> </li>
		       <li><div class="button"><div class="buttonContent"><button type="button" onclick="CloseDialog()">关闭</button></div></div></li>
	        </ul>
        </div>    
    </div>
</form>
</body>
</html>
